import os
from openai import OpenAI

# 设置 API Key
os.environ["OPENAI_API_KEY"] = "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"

# 如果你需要走本地代理（Clash for Windows）
# 这里配置 HTTP 和 HTTPS 代理
os.environ["HTTP_PROXY"] = "http://127.0.0.1:7890"
os.environ["HTTPS_PROXY"] = "http://127.0.0.1:7890"

# 创建客户端
client = OpenAI()

# 发送测试请求
response = client.chat.completions.create(
    model="gpt-5",  # 使用 GPT-5 模型
    messages=[
        {"role": "user", "content": "你能做什么？"}
    ]
)

print(response.choices[0].message.content)
